home *** CD-ROM | disk | FTP | other *** search
/ Digital Pose Collection / Digital Pose Collection.iso / pc / modules / _calen.exe / _calen.dxr / 00001.ls next >
Encoding:
Text File  |  1996-06-13  |  2.5 KB  |  152 lines

  1. global gv, gh, gct, gsp, gpre, gmonth, nowpict, rwobj, gmsize, dobj, call
  2.  
  3. on startMovie
  4.   cursor(200)
  5.   set call to [7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9]
  6.   if the machineType <> 256 then
  7.     openXLib("xGetDate")
  8.   else
  9.     openXLib("XGETDATE.DLL")
  10.   end if
  11.   set dobj to xgetdate(mnew)
  12.   set gv to the mouseV
  13.   set gh to the mouseH
  14.   set the exitLock to 1
  15.   if yearcheck() = 1 then
  16.     repeat with i = 1 to 4
  17.       puppetSprite(i, 0)
  18.     end repeat
  19.     go("ready")
  20.   else
  21.     dosetup()
  22.   end if
  23. end
  24.  
  25. on dosetup
  26.   repeat with i = 1 to 4
  27.     puppetSprite(i, 1)
  28.     set the stretch of sprite i to 0
  29.   end repeat
  30.   setsprite()
  31. end
  32.  
  33. on yearcheck
  34.   set ret to 0
  35.   if (getyear() < "1995") or (getyear() > "1999") then
  36.     set ret to 1
  37.   end if
  38.   return ret
  39. end
  40.  
  41. on setsprite
  42.   yearcheck()
  43.   set gmonth to value(getmonth())
  44.   set myyear to value(getyear())
  45.   set nowpict to ((myyear - 1995) * 20) + gmonth
  46.   set calnum to getAt(call, gmonth)
  47.   if (gmonth mod 2) = 0 then
  48.     set nowsp to 2
  49.   else
  50.     set nowsp to 3
  51.   end if
  52.   set the castNum of sprite 4 to the number of member nowpict
  53.   set the castNum of sprite nowsp to the number of member calnum
  54.   updateStage()
  55. end
  56.  
  57. on myaction
  58.   mysaver(1)
  59.   if yearcheck() = 0 then
  60.     setsprite()
  61.   end if
  62.   updateStage()
  63. end
  64.  
  65. on mysaver x
  66.   if (gv <> the mouseV) or (gh <> the mouseH) then
  67.     dosaver(x)
  68.   end if
  69.   when keyDown then doSaver x
  70.   when mouseDown then doSaver x
  71. end
  72.  
  73. on dosaver x
  74.   repeat with i = 1 to 4
  75.     set the castNum of sprite i to the number of member "dummy"
  76.   end repeat
  77.   updateStage()
  78.   if objectp(dobj) then
  79.     dobj(mdispose)
  80.     if the machineType <> 256 then
  81.       closeXLib("xgetDate")
  82.     else
  83.       closeXLib("XGETDATE.DLL")
  84.     end if
  85.   end if
  86.   quit()
  87. end
  88.  
  89. on areuready
  90.   mysaver(2)
  91.   if yearcheck() = 0 then
  92.     go(the frame + 1)
  93.   end if
  94. end
  95.  
  96. on getdate
  97.   set ret to EMPTY
  98.   if objectp(dobj) then
  99.     set ret to dobj(mgetdate)
  100.   end if
  101.   return ret
  102. end
  103.  
  104. on getyear
  105.   if objectp(dobj) then
  106.     set ret to dobj(mgetyear)
  107.   end if
  108.   return ret
  109. end
  110.  
  111. on getmonth
  112.   if objectp(dobj) then
  113.     set ret to dobj(mgetmonth)
  114.   end if
  115.   return ret
  116. end
  117.  
  118. on getday
  119.   if objectp(dobj) then
  120.     set ret to dobj(mgetday)
  121.   end if
  122.   return ret
  123. end
  124.  
  125. on gettime
  126.   if objectp(dobj) then
  127.     set ret to dobj(mgettime)
  128.   end if
  129.   return ret
  130. end
  131.  
  132. on gethour
  133.   if objectp(dobj) then
  134.     set ret to dobj(mgethour)
  135.   end if
  136.   return ret
  137. end
  138.  
  139. on getmin
  140.   if objectp(dobj) then
  141.     set ret to dobj(mgetmin)
  142.   end if
  143.   return ret
  144. end
  145.  
  146. on getsec
  147.   if objectp(dobj) then
  148.     set ret to dobj(mgetsec)
  149.   end if
  150.   return ret
  151. end
  152.